]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusManager: Use setup X11 display for ibus-x11
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 29 Feb 2020 17:43:28 +0000 (18:43 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 29 Feb 2020 17:58:47 +0000 (18:58 +0100)
(re)spawning ibus to get ibus-x11 will be part atm of Xwayland
initialization process. For it to be set up before the client
it needs using the GNOME_SETUP_DISPLAY.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/836

js/misc/ibusManager.js

index cc699c33c2dcaf2f20fce7f25166e2a68449176e..2049758eabbcd329a600796cbe9c66ccf6cbf06c 100644 (file)
@@ -61,7 +61,12 @@ var IBusManager = class {
     _spawn(extraArgs = []) {
         try {
             let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
-            Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
+            let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE);
+            // Forward the right X11 Display for ibus-x11
+            let display = GLib.getenv('GNOME_SETUP_DISPLAY');
+            if (display)
+                launcher.setenv('DISPLAY', display, true);
+            launcher.launch(cmdLine);
         } catch (e) {
             log(`Failed to launch ibus-daemon: ${e.message}`);
         }